home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / ElectronicWave2.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.2 KB  |  95 lines

  1. ========== Description Part Begin ==========
  2. name = "Electronic Wave2";
  3. description = "To imitate the flow of electricity.";
  4. version = "1.00";
  5. bin = "ElectronicWave2.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11.  
  12. $bDirection(LIST,INT,1,"Left":1 "Right":0,"Direction","To control characters beginning to change from left to right, or right to left.");
  13. $bIsChangeColor(LIST,INT,1,"Yes":1 "No":0,"Color Change ","To control whether to change the characters' colors.");
  14. $nInterval(EDIT,INT,1,1 1000,"Interval","The time difference between the former character and the latter one beginning to change.");
  15.  
  16. ========== Parameter Part End ==========
  17.  
  18. ========== Function Part Begin ==========
  19. nCharacterCount = 8;
  20. nFrameCount = 8;
  21. nInterval = 1;
  22. bIsChangeColor = 1;
  23. bDirection = 1;
  24.  
  25.  
  26.  
  27.  
  28.  
  29. nIndex = nCharacterCount;
  30. nTemp = nInterval;
  31. if(bDirection)
  32.     nWho = 1;
  33. else
  34.     nWho = nCharacterCount;
  35. for(i = 1;i <= nCharacterCount ;i++)
  36. {
  37.         nIndex++;
  38.         this["c" + i].duplicateMovieClip("t" + i + 1, nIndex);
  39.         this["t" + i + 1]._visible = false;
  40.         this["t" + i + 1]._yscale = 200;
  41. }
  42.  
  43.  
  44.  
  45. function fun()
  46. {
  47.     nTemp--;
  48.     if(nTemp == 0)
  49.     {
  50.         for (i = 1; i <= nCharacterCount ; i++)
  51.         {
  52.             this["t" + i + 1]._visible = false;
  53.         }
  54.         
  55.         this["t" + nWho + 1]._visible = true;
  56.         if(bIsChangeColor)
  57.         {    
  58.             tempColor = new Color(this["t" + nWho + 1]);
  59.             col = random(0xffffff);
  60.             tempColor.setRGB(col);    
  61.         }
  62.         if(bDirection)
  63.         {
  64.             nWho++;
  65.             if(nWho > nCharacterCount)
  66.             nWho = 1;
  67.         }
  68.         else
  69.         {
  70.             nWho--;
  71.             if(nWho < 1)
  72.                 nWho = nCharacterCount;
  73.         
  74.         }
  75.         
  76.         nTemp = nInterval;
  77.     }
  78. }
  79.  
  80.  
  81. function again()
  82. {
  83.     gotoAndPlay(2);
  84. }
  85.  
  86.  
  87. ========== Function Part End ==========
  88.  
  89. ========== Frame Part Begin ==========
  90. $frame(fun,1,-1,"fun");
  91. $frame(fun,2,-1,"fun");
  92. $frame(again,3,-1,"again");
  93. ========== Frame Part End ========== 
  94.